package com.yunji.ylexpiration_backstage.mapper;

import com.yunji.ylexpiration_backstage.entity.FurnCommodity;
import com.yunji.ylexpiration_backstage.entity.FurnCommodityExample;
import com.yunji.ylexpiration_backstage.entity.FurnCommodityKey;
import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

@Mapper
@Repository
public interface FurnCommodityMapper {
    int countByExample(FurnCommodityExample example);

    int deleteByExample(FurnCommodityExample example);

    int deleteByPrimaryKey(FurnCommodityKey key);

    int insert(FurnCommodity record);

    int insertSelective(FurnCommodity record);

    List<FurnCommodity> selectByExample(FurnCommodityExample example);

    FurnCommodity selectByPrimaryKey(FurnCommodityKey key);

    int updateByExampleSelective(@Param("record") FurnCommodity record, @Param("example") FurnCommodityExample example);

    int updateByExample(@Param("record") FurnCommodity record, @Param("example") FurnCommodityExample example);

    int updateByPrimaryKeySelective(FurnCommodity record);

    int updateByPrimaryKey(FurnCommodity record);


    //根据销量查询排名前10的
    List<FurnCommodity> selectBysalesnumByLimit10();

    //根据id查询
    FurnCommodity selectByid(Integer id);

    //查询全部信息
    List<FurnCommodity> getAll(String productname);

    //批量或单个删除
    int deletebatches(Integer [] id);
}